package com.teyao.teyao_back.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.teyao.teyao_back.entity.LoadingDetailsWrapper;
import com.teyao.teyao_back.entity.ResponseMessage;
import com.teyao.teyao_back.mapper.LoadingDetailsMapper;
import com.teyao.teyao_back.service.LoadingDetailsService;
import org.springframework.stereotype.Service;

@Service
public class LoadingFuDetailsImpl extends ServiceImpl<LoadingDetailsMapper, LoadingDetailsWrapper> implements LoadingDetailsService {
    // 按照订单ID获取详单信息
    @Override
    public ResponseMessage selectByOrderId(String orderId) {
        ResponseMessage responseMessage = new ResponseMessage();
        QueryWrapper<LoadingDetailsWrapper> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_id", orderId);
        responseMessage.setData(baseMapper.selectList(queryWrapper));
        return responseMessage;
    }

}
